#!/bin/bash
#leao:Thu Aug 22 09:25:23 AM CST 2024
# while
# while 表达式
# do
#     命令集;
# done
# 1-n
# read -p "求1+2..n
# " n
# while (( n > 0 )) 
#     do
#         sum=$(( n + sum )) 
#          ((n-- ));
# done
# echo $sum
# while [ $n -ge 0 ]
#     do
#         sum=$[ n + sum ]
#         # let n--
#         # n=$[ n - 1 ]
#         ((n--))
# done
# echo $sum
# ////////////////////////
# break n  跳出n层循环
# continue n 
# while true
#     do
#         echo "1"
#         while true
#             do
#              echo "2"
#                 while true
#                     do
#                      echo "3"
#                         break 3
#                         done
#                 done
#         done
# for((i=1;i<=100;i++))
# do
#     sum=$[sum+i]
# done
# echo $sum
# for 变量 in 单词表
#     do
#         命令表
# done  
# a="a b c d e f asd 123"
# for val in $a
# do
#     echo $val
# done
# for val in `ls`
# do
#     echo $val
# done

